package lab01;

/**
 * Created by Administrator on 2017/9/30.
 */
public class Test11 {
    public static void main(String[] args) {
        int count = 0;
        for (int n = 1; n <= 100; n++) {
            boolean b = true;
            if (n != 1) {
                for (int i = 2; i < n; i++) {
                    if (n % i == 0) {
                        b = false;
                        break;
                    }
                }
                if (b) {
                    System.out.print(n + "是质数  ");
                    count++;
                    if (count % 5 == 0) {
                        System.out.println();
                        continue;
                    }
                }
            }
        }
    }
}
